package cn.edu.mju.service.impl;

import cn.edu.mju.dao.BookDao;
import cn.edu.mju.pojo.Book;
import cn.edu.mju.pojo.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("bookService")
public class BookServiceImpl implements cn.edu.mju.service.BookService {

    @Resource
    private BookDao bookDao;

    @Override
    public int addBook(Book book) {
        return bookDao.addBook(book);
    }

    @Override
    public int updateBook(Book book) {
        return bookDao.updateBook(book);
    }

    @Override
    public int delBook(int bookId) {
        return bookDao.delBook(bookId);
    }

    @Override
    public Book queryBook(int bookId) {
        return bookDao.queryBook(bookId);
    }

    @Override
    public List<Book> findAllBook() {
        return bookDao.findAllBook();
    }

    @Override
    public List<Book> searchBook(String bookName) {
        return bookDao.searchBook(bookName);
    }
}
